<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<%@include file="../common/common.jsp" %>
		<script type="text/JavaScript" src="${ctx}/js/jquery.form.js"></script> 
		<title>个人资料</title>
	</head>

	<body>
		<header class="header">
			<nav class="headerTwo">
				<img src="${ctx }/image/bg.png" alt="" />
				<a href="javascript:history.back(-1)" class="fl"><img src="${ctx }/image/return.png" alt="" /></a>
				<h2>个人资料</h2>				
				<%@include file="../common/headerR.jsp"%> 
			</nav>
		</header>
	<form action="${ctx}/consultComment/upTest" method="POST" name="uploadImageID" id="uploadImageID" enctype="multipart/form-data">
		<input type="hidden" name="memberId" id="memberId" value="">
		<ul class="personalData">
			<li class="clearfix js_uploadBox">
				<span class="fl ">头像</span>
				<img src="${ctx }/image/center-right.png" alt="" class="fr " />
				<a href="#" class="js_showBox fr"><img id="headImg" src="${ctx }/image/tx.png" alt="" / class="pd fr "></a>
				<div class="modifyImage moImg">
			    <p>头像</p>
					<ul>
						<li>拍照</li>
							<input type="file" name="myfiles" id="doc1"  onchange="uploadPic('pic1');" class="js_upFile2"  multiple="multiple" accept="image/*" capture="camera" size="30"> 
						<li class="moImage">本地照片</li>
							<input type="file" name="myfiles2" id="doc2"  onchange="uploadPic('pic2');" class="js_upFile"  > 
					</ul>
				</div>
			</li>
			<li class="clearfix">
				<a href="javascript:void(0);" onclick="modify();" >
					<span class="fl">昵称</span>
					<img src="${ctx }/image/center-right.png" alt="" class="fr" />
					<span class="fr" id="mName">小丸子</span>
				</a>
			</li>
			<li class="clearfix">
				<span class="fl">性别</span>
				<img src="${ctx }/image/center-right.png" alt="" class="fr" />
				<span class="fr" id="mSex">女</span>
			</li>
			<li >
				<a href="javascript:void(0);" onclick="myAddress();" class="clearfix">
					<span class="fl">我的收货地址</span>
					<img src="${ctx }/image/center-right.png" alt="" class="fr" />
				</a>
			</li>
		</ul>
	</form>		
		<div class="mengban"></div>
		
		<div class="modifyImage moSex">
			<p>性别</p>
			<ul>
				<li >男</li>
				<li>女</li>
			</ul>
		</div>
	</body>
    
    <%-- <script type="text/javascript" src="${ctx }/js/jquery.uploadView.js"></script>
		<script type="text/javascript" src="${ctx }/js/ajaxfileupload.js"></script> --%>
		<script type="text/javascript" src="${ctx }/js/public.js"></script>
		<%-- <script type="text/javascript" src="${ctx }/js/upO.js"></script> --%>
		<script type="text/javascript" src="${ctx }/js/member/personalData.js"></script>
		<script type="text/javascript" src="${ctx }/js/member/modify.js"></script>  
    
<script type="text/javascript">
    
/***个人图片上传**********/    	
	function uploadPic(picIMG){
		//var $("#memberId").val();
	 	$("#uploadImageID").ajaxSubmit({
	        type: 'post',
	        url: '${ctx}/uploadImage/upPersonalImage',
	        beforeSubmit: function () {
	        	var file = $("#doc1").val();
	        	var file2 = $("#doc2").val();
	        	return true;
	        }, 
	 //       data : {"memberId":memberId},
	//      async: false,
	        success:function(data,status){
				if(data.resultSuccess == true){
					window.location.href = "${ctx}/member/personalData";
				}else{
					alert(data.resultDesc);
				}
			},
			error:function(xhr,status,e){
				$.messager.alert('异常提示:',e,'error'); 
			}
	    });
       	return true;
	}
</script>
    
</html>